<?php
//
//	file: includes/calendar/class_calendar.php
//	author: ptirhiik
//	begin: 01/02/2006
//	version: 1.6.3 - 29/06/2008
//	license: http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
//

if ( !defined('IN_PHPBB') )
{
	die('Hacking attempt');
}

// version
define('TC_CURRENT_VERSION', '2.2.4');

// do not go further during login or installation
if ( defined('IN_LOGIN') || defined('IN_INSTALL') )
{
	return;
}

// intall directory still present
if ( @file_exists(phpbb_realpath($config->root . 'install_cal')) )
{
	if ( $config->data['mod_topic_calendar_CH'] != TC_CURRENT_VERSION )
	{
		header('Location: ' . $config->url('install_cal/install'));
		exit;
	}
	else
	{
		message_die(GENERAL_MESSAGE, 'Please remove install_cal/ directory');
	}
}

if ( !$config->data['mod_topic_calendar_CH'] )
{
	return;
}

// rest of the process
include($config->url('includes/calendar/class_calendar_init'));

?>